#pragma once
#include "pch.h"
#include "common/HiveConfig.h"

typedef CGAL::Exact_predicates_inexact_constructions_kernel					  Kernel;
typedef CGAL::Simple_cartesian<double>										  K;
typedef K::Point_3															  Point3;
typedef K::Point_2													     	  Point2;
typedef CGAL::Surface_mesh<Point3>											  CGALMeshType;
typedef CGAL::Scale_space_surface_reconstruction_3<Kernel>                    Reconstruction;
typedef CGAL::Scale_space_reconstruction_3::Advancing_front_mesher<Kernel>    Mesher;
typedef CGAL::Scale_space_reconstruction_3::Jet_smoother<Kernel>              Smoother;
typedef Kernel::Point_3														  Point;
typedef Kernel::Point_3														  Point3D;
typedef Kernel::Point_2														  Point2D;
typedef Reconstruction::Facet_iterator										  Facet_iterator;
typedef CGAL::Surface_mesh<K::Point_3>										  Surface_mesh;
typedef CGAL::Point_set_3<Point>											  CGALPointSetType;
typedef CGAL::Surface_mesh<Point3>											  CGALMeshType;
typedef Surface_mesh::Vertex_index											  vertex_descriptor;
typedef Surface_mesh::Face_index											  face_descriptor;
typedef boost::graph_traits<CGALMeshType>::halfedge_descriptor				  HalfedgeDescriptor;
typedef boost::graph_traits<CGALMeshType>::edge_descriptor					  EdgeDescriptor;
namespace SMS = CGAL::Surface_mesh_simplification;
typedef pcl::PointXYZRGB													  PCLPointType;
typedef pcl::PointCloud<PCLPointType>										  PCLPointSetType;
typedef pcl::PolygonMesh													  PCLMeshType;
using namespace std;

namespace AutomatedSurfaceReconstruction
{
	std::string generateTime();
	double getSystemTotalMemoryInMB();
	double getSystemFreeMemoryInMB();
	bool isSubconfigValid(const hiveConfig::CHiveConfig* vConfig, std::string vConfigType);
	bool convertPointCloudFromPCL2CGAL(const PCLPointSetType::Ptr& vPCLPointCloud, CGALPointSetType& voCGALPointCloud);
	bool convertPointCloudFromCGAL2PCL(const CGALPointSetType& vCGALPointCloud, PCLPointSetType::Ptr& voPCLPointCloud);
}